package main

import "fmt"

func main() {
	var myMap map[int]string

	//	使用make初始化，分配空间
	myMap = make(map[int]string, 10)
	fmt.Printf("make--ch addr %v \n", &myMap)

	addEle(myMap)

	fmt.Printf("---------------")
	fmt.Printf("---------------")
	removeEle(myMap)

}

func addEle(map1 map[int]string) {
	fmt.Printf("addEle--ch addr %v \n", &map1)
	map1[1] = "value1"
	map1[2] = "value2"
	map1[3] = "value3"
}

func removeEle(map2 map[int]string) {
	fmt.Printf("removeEle--ch addr %v \n", &map2)

	delete(map2, 1)
}
